package com.aipp.mall.h5.domain.entity;

import com.aipp.mall.common.anno.Note;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 优惠券活动表对象 act_coupon_activity
 *
 * @author zcc
 */
@Data
@TableName("act_coupon_activity")
public class CouponActivity implements Serializable {
    @Serial
    private static final long serialVersionUID = -6376572761623196903L;

    @Note("ID")
    private Long id;

    @Note("活动名称")
    private String title;

    @Note("使用范围  1全场通用 2指定商品可用 3指定商品不可用")
    private Integer useScope;

    @Note("商品id集合，逗号分隔")
    private String productIds;

    @Note("发行总数")
    private Integer totalCount;

    @Note("剩余总数")
    private Integer leftCount;

    @Note("每人限领")
    private Long userLimit;

    @Note("优惠券金额")
    private BigDecimal couponAmount;

    @Note("最低消费金额")
    private BigDecimal minAmount;

    @Note("要兑换的积分")
    private BigDecimal useIntegral;

    @Note("1免费兑换  2积分兑换")
    private Integer couponType;

    @Note("活动开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginTime;

    @Note("活动结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Note("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Note("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
